<%@ page language="java"
	import="java.text.*,java.sql.*,tt.*"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<%
		request.setCharacterEncoding("UTF-8");
		String s1 = request.getParameter("name");
		String s2 = request.getParameter("xueshi");
		String s3 = request.getParameter("gradeid");
		MySqlStudentDao my = new MySqlStudentDao();
		tt.Chengji s = new tt.Chengji();
		s.setSubjectname(s1);
		s.setClasshour(Long.parseLong(s2));
		s.setGradeid(Long.parseLong(s3));
		if(my.add(s)==1){
		out.print("保存成功！");
		response.sendRedirect("5.31zuoye3.jsp"); 
		}
		else{
		out.print("增加失败！");
		response.sendRedirect("5.31zuoye3.1.jsp"); 
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		
		}
	%>
</body>
</html>